package com.example.design.chain.leaveapply;

import com.example.design.chain.leaveapply.concrethandler.CompanyLeader;
import com.example.design.chain.leaveapply.concrethandler.DepartLeader;
import com.example.design.chain.leaveapply.concrethandler.TeamLeader;
import com.example.design.chain.leaveapply.handler.Leader;

/**
 * @Description 责任链测试类-客户类（Client）角色
 * @ClassName ChainTest
 * @Author Administrator
 * @Date 2020/5/16 10:49
 * @Version 1.0.0
 */
public class ChainTest {

    public static void main(String[] args) {
        Leader teamLeader = new TeamLeader("张团团");
        Leader departLeader = new DepartLeader("李部部");
        Leader companyLeader = new CompanyLeader("王司司");
        teamLeader.setNext(departLeader);
        departLeader.setNext(companyLeader);

        teamLeader.handleRequest(8);
    }
}
